#!/usr/bin/env python
#-*- coding:utf-8 -*-
# author:zhang
# datetime:2019/4/29 20:36
# software: PyCharm

from django.forms import ModelForm
from web import models

class BookForm(ModelForm):
    
    class Meta:
        model = models.Book
        fields = "__all__"
        
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        for field in self.fields.values():
            field.widget.attrs.update({"class": "form-control"})







